<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增文章')" />
	<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: bootstrap-fileinput-css" />
	<th:block th:include="include :: select2-css" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/ueditor.config.js}"></script>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/ueditor.all.js}"> </script>
	<script type="text/javascript" charset="utf-8" th:src="@{/ueditor/lang/zh-cn/zh-cn.js}"></script>
	<link type="text/css" rel="stylesheet" th:href="@{/ueditor/third-party/video-js/video-js.css}"/>
	<script  type="text/javascript" th:src="@{/ueditor/third-party/video-js/video.js}"></script>+
</head>
<body class="white-bg">
<div class="btn-group-sm"  role="group">
	<a class="btn btn-success" onclick="auditRecord()">
		审核记录
	</a>
	<a class="btn btn-success" onclick="auditPass()">
		审核通过
	</a>
	<a class="btn btn-success" onclick="auditFail()">
		审核不通过
	</a>
</div>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-notice-add" th:object="${bus}">
		<input name="id"  id="id" type="hidden" th:value="*{id}" />
		<div class="form-group">
			<label class="col-sm-2 control-label is-required">标题：</label>
			<div class="col-sm-10">
				<input id="fa-noticeTitle" class="form-control" name="title" type="text" th:field="*{title}" readonly="true">
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label is-required">产业分类：</label>
			<div class="col-xs-10">
				<select id="fa-industry" class="form-control select2-multiple" aria-readonly="true" multiple>
					<option th:value="*{industry}" th:text="*{industry}" th:selected='true'></option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label is-required">价格类型：</label>
			<div class="col-sm-10">
				<label class="radio-box"> <input type="radio" name="priceType" th:field="*{priceType}" value="1" /> 面谈 </label>
				<label class="radio-box"> <input type="radio" name="priceType" th:field="*{priceType}" value="2" /> 意向价格 </label>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">意向价格：</label>
			<div class="col-sm-10">
				<input id="fa-price"  class="form-control" type="text" name="price" th:field="*{price}" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label">文章内容：</label>
			<div class="col-sm-10">
				<textarea id="editors"    type="text/plain" style="width:1024px;height:500px;" name="content" th:field="*{content}" ></textarea>
			</div>
		</div>
	</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<th:block th:include="include :: select2-js" />
<script type="text/javascript">
	var prefix = ctx + "system/business";
	var pref = ctx + "system/cloumn";


	$("#form-notice-add").validate({
		focusCleanup: true
	});

	function submitHandler() {
		    $.modal.close();
	}

	/*用户管理-新增-选择部门树*/
	function selectDeptTree() {
		var url = pref + "/selectTree"+$("#treeId").val();
		var options = {
			title: '选择栏目',
			width: "380",
			url: pref + "/selectTree/" + $("#treeId").val(),
			callBack: doSubmit
		};
		$.modal.openOptions(options);
	}
	function doSubmit(index, layero){
		var body = layer.getChildFrame('body', index);
		$("#treeId").val(body.find('#treeId').val());
		$("#treeName").val(body.find('#treeName').val());
		layer.close(index);
	}

	function auditRecord(){
	    var id = $("#id").val();
	    if (id.length != 0) {
			$.modal.open("审核记录", prefix + "/audit/" + id);
		}else{
			$.modal.alert("无审核记录！");
		}
	}

    function auditPass(){
        var id = $("#id").val();
    	$.modal.open("审核操作",prefix + "/audit/pass/" + id);
    }

	function auditFail(){
		var id = $("#id").val();
    	$.modal.open("审核操作",prefix + "/audit/fail/" + id);
	}


	var ue = UE.getEditor('editors',{
	});

	$(function(){
		var ue = UE.getEditor('editors')
		ue.addListener("ready", function () {
		});
	});
</script>
</body>
</html>
